<style type="text/css">
ul.site li {
	float:left;
	margin:5px;
	width:80px;
	height:80px;
	overflow:hidden;
	border:1px solid #CCC;
}
div.pages {
	clear:both;
	height:20px;
	padding:5px;
}
</style>
<script type="text/javascript">
function insert(file)
{
	$("#<?php echo $this->uri->segment(3)?>", top.document).val(file);
	parent.$.fn.colorbox.close();
}
</script>
<?php $seg2 = $this->uri->segment(2); ?>

<div class="media-upload-header">
    <ul id="menu">
        <li><a href="<?php echo base_url()?>index.php/filemanager/index/<?php echo $this->uri->segment(3)?>" <?if($seg2=='index'){echo ' class="current"';}?>>Thư viện</a></li>
        <li><a href="<?php echo base_url()?>index.php/filemanager/upload/<?php echo $this->uri->segment(3)?>" <?if($seg2=='upload'){echo ' class="current"';}?>>Upload</a></li>
    </ul>
</div>
<div style="padding:20px; height:500px; overflow: auto;">
    <ul class="site">
	<? foreach($list as $rs): ?>
         <li><a id="cboxClose" href="javascript:;" onclick="insert('<?=$rs->lb_name?>');"><?=$this->icon_library->loadtypefile($rs->lb_name, $rs->ext)?></a></li>
    <? endforeach;?>
    </ul>
    <div class="pages"><?=$pagination?></div>
</div>
